package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 地址学区替换表
 *
 * @author zhiyuan
 * @since 2024-03-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_address_school_replace")
@Schema(name = "EduAddressSchoolReplace", title = "地址学区替换表", description = "地址学区替换表实体类")
public class EduAddressSchoolReplace extends Model<EduAddressSchoolReplace> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "replaceId", description = "处理id")
    @TableId(value = "replace_id", type = IdType.ASSIGN_ID)
    private Long replaceId;

    @Schema(name = "addressId", description = "地址id")
    @TableField(value = "address_id")
    private String addressId;

    @Schema(name = "addressName", description = "地址名")
    @TableField(value = "address_name")
    private String addressName;

    @Schema(name = "oldSchoolName", description = "原关联学校名称")
    @TableField(value = "old_school_name")
    private String oldSchoolName;

    @Schema(name = "oldSchoolId", description = "原关联学校id")
    @TableField(value = "old_school_id")
    private String oldSchoolId;

    @Schema(name = "newSchoolName", description = "替换关联学校名")
    @TableField(value = "new_school_name")
    private String newSchoolName;

    @Schema(name = "newSchoolId", description = "替换学校id")
    @TableField(value = "new_school_id")
    private String newSchoolId;

    @Schema(name = "treeId", description = "地址树叶子节点id")
    @TableField(value = "tree_id")
    private Long treeId;

    @Schema(name = "addressSchoolId", description = "替换后地址学校关联id")
    @TableField(value = "address_school_id")
    private String addressSchoolId;

    @Schema(name = "status", description = "处理状态：0未处理，1处理中 2处理完成 3 处理失败")
    @TableField(value = "status")
    private String status;

    @Schema(name = "handleTime", description = "处理时间")
    @TableField(value = "handle_time")
    private Date handleTime;

    @Schema(name = "handleRemark", description = "处理备注")
    @TableField(value = "handle_remark")
    private String handleRemark;

    @Override
    public Serializable pkVal() {
        return this.replaceId;
    }
}
